

ROOT_PATH?=$(shell cd $(PWD)/..; pwd)
include $(ROOT_PATH)/Makefile.param

.PHONY: all clean

SRC+=$(wildcard *.c)
SRC+=$(wildcard ../utils/*.c)
SRC+=$(wildcard ../common/*.c)
OBJ:=$(SRC:%.c=%.o)

TARGET:=remote_client

all: $(TARGET)
$(TARGET) : $(OBJ)
	$(CC) -o $@  $^ $(LINK_FLAGS) $(MONGOOSE_LINK_FLAGS) $(SSL_LINK_FLAGS)

$(OBJ) : %.o:%.c
	$(CC)  -DENABLE_LOG -DENABLE_CURL -fPIC  $(COM_INC) -c $^ -o $@

clean:
	rm -f $(OBJ)
	rm -f tags
